#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITransitionView.h>
#import "UIKit/UITextView.h"
#import "UIKit/UISegmentedControl.h"
#import "UIKit/UIPreferencesTable.h"
#import "UIKit/UISwitchControl.h"
#import "UIKit/UIPreferencesTableCell.h"
#import "UIKit/UIPreferencesTextTableCell.h"
#import "UIKit/UIProgressIndicator.h"
#import "PongPrefs.h"
#import "UIKit/UIKeyboard.h"
#import "ShellKeyboard.h"

@interface PongPrefsView : UIView 
{
	UINavigationBar		*_navBar;
	UITransitionView	*_transitionView;
	UIPreferencesTable	*_table;
	UISegmentedControl	*typeSelection;
	UISwitchControl		*networkEnabledSwitch;	
		
	UITextField			*hostnameField;
	UITextField			*portField;
	UIProgressIndicator *progressIndicator;

	NSString 			*hostnameEXIST;
	NSString			*portEXIST;
	ShellKeyboard		*_keyboard;
	bool				editOrnew;

    CGRect _rect;
	id _delegate;
}

- (id)initWithFrame:(CGRect)frame;
- (void)setMode:(bool)_mode;
- (bool)getMode;
- (void)setDelegate:(id)delegate;

- (void)startSpinning;
- (void)stopSpinning;

//call this before closing!  It updates the prefs obj to reflect the UI.
-(void)updatePrefs;

//preferences table delegate methods
- (BOOL)preferencesTable:(UIPreferencesTable *)aTable isLabelGroup:(int)group;
- (float)preferencesTable:(UIPreferencesTable *)aTable heightForRow:(int)row inGroup:(int)group withProposedHeight:(float)proposed ;
- (int)numberOfGroupsInPreferencesTable:(UIPreferencesTable *)aTable ;
- (UIPreferencesTextTableCell *)preferencesTable:(UIPreferencesTable *)aTable cellForRow:(int)row inGroup:(int)group ;


@end
